package com.chenfan.process.enums;

import lombok.Getter;

/**
 * @author liuming
 * @date 2022/1/14
 */
public enum OperationEnum {

    AND(0, "并且"), OR(1, "或者");

    @Getter
    private Integer code;
    @Getter
    private String message;

    OperationEnum(Integer code, String message) {
        this.code = code;
        this.message = message;
    }

    public static String getMessage(Integer code) {
        for (OperationEnum v : values()) {
            if (v.getCode().equals(code)) {
                return v.getMessage();
            }
        }
        return "";
    }
}
